﻿using System.Runtime.Serialization;
using System.Diagnostics.CodeAnalysis;

namespace Kaesoft.Hospedaje.Entities
{
    [DataContract]
    public class ErrorMessage
    {
        #region Fields

        private ErrorType _errorType;
        private string _errorText;
        private string _errorProperty;

        #endregion

        #region Constructor
        [SuppressMessage("Microsoft.Design", "CA1026")]
        public ErrorMessage(string errorText, ErrorType errorType, string errorProperty = null)
        {
            _errorText = errorText;
            _errorType = errorType;
            _errorProperty = errorProperty;
        }

        #endregion

        #region Properties

        [DataMember]
        public ErrorType ErrorType
        {
            get { return _errorType; }
            set { _errorType = value; }
        }

        [DataMember]
        public string ErrorText
        {
            get { return _errorText; }
            set { _errorText = value; }
        }

        [DataMember]
        public string ErrorProperty
        {
            get { return _errorProperty; }
            set { _errorProperty = value; }
        }

        #endregion
    }
}